home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / vcommon / RenderInfo.h < prev    next >
C/C++ Source or Header  |  1994-08-18  |  3KB  |  95 lines

  1. /*
  2.  * MKSoft Development Amiga ToolKit V1.0
  3.  *
  4.  * Copyright (c) 1985,86,87,88,89,90 by MKSoft Development
  5.  *
  6.  * $Id: RenderInfo.h,v 30.8 1994/08/18 05:53:14 dice Exp dice $
  7.  *
  8.  * $Source: /home/dice/com/src/vcommon/RCS/RenderInfo.h,v $
  9.  *
  10.  * $Date: 1994/08/18 05:53:14 $
  11.  *
  12.  * $Revision: 30.8 $
  13.  *
  14.  * $Log: RenderInfo.h,v $
  15.  * Revision 30.8  1994/08/18  05:53:14  dice
  16.  * .
  17.  *
  18.  * Revision 30.0  1994/06/10  18:09:38  dice
  19.  * .
  20.  *
  21.  * Revision 30.0  1994/06/10  18:09:38  dice
  22.  * .
  23.  *
  24.  * Revision 1.1  1992/07/18  23:10:13  jtoebes
  25.  * Initial revision
  26.  *
  27.  * Revision 1.2  92/05/04  22:30:48  jtoebes
  28.  * First mostly working version.  Still needs list gadgets and menu support
  29.  * 
  30.  * Revision 1.1  92/04/21  06:22:12  J_Toebes
  31.  * Initial revision
  32.  *
  33.  * Revision 1.2  90/05/20  12:18:36  mks
  34.  * New functions to allocate and free RenderInfo structure.
  35.  * These should be used insted of the old FillIn_RenderInfo...
  36.  * Now has a TextAttr in the RenderInfo
  37.  * Now has the screen Width/Height in RenderInfo
  38.  * Now can be passed a screen pointer
  39.  *
  40.  * Revision 1.1  90/05/09  21:45:05  mks
  41.  * Source now fully under RCS...
  42.  *
  43.  */
  44.  
  45. /*
  46.  * This file contains the definition of the rendering information
  47.  * for elements on the screen.  This information is used to generate
  48.  * the correct pen colours for items on the screen...
  49.  *
  50.  * Note, that to call this function you MUST have Intuition and Graphics
  51.  * libraries open...
  52.  */
  53.  
  54. #ifndef MKS_RENDERINFO_H
  55. #define MKS_RENDERINFO_H
  56.  
  57. #include        <exec/types.h>
  58. #include        <graphics/text.h>
  59. #include        <intuition/screens.h>
  60.  
  61. struct RenderInfo
  62. {
  63.         UBYTE           Highlight;      /* Standard Highlight   */
  64.         UBYTE           Shadow;         /* Standard Shadow      */
  65.         UBYTE           TextPen;        /* Requester Text Pen   */
  66.         UBYTE           BackPen;        /* Requester Back Fill  */
  67.  
  68.         UBYTE           WindowTop;      /* Top border of window */
  69.         UBYTE           WindowLeft;     /* Left border          */
  70.         UBYTE           WindowRight;    /* Right border         */
  71.         UBYTE           WindowBottom;   /* Bottom border        */
  72.  
  73.         UBYTE           WindowTitle;    /* Window title size    */      /* includes border */
  74.         UBYTE           junk_pad;
  75.  
  76.         SHORT           ScreenWidth;    /* Width of the screen */
  77.         SHORT           ScreenHeight;   /* Height of the screen */
  78.  
  79.         USHORT          FontSize;       /* Font size for string gadgets */
  80.  
  81. struct  TextFont        *TheFont;       /* Font TextFont */
  82. struct  TextAttr        TextAttr;       /* Font TextAttr */
  83. };
  84.  
  85. /*
  86.  * Calculate a rough brightness hamming value...
  87.  */
  88. #define ColorLevel(rgb) ColourDifference(rgb, 0)
  89.  
  90. VOID CleanUp_RenderInfo(struct RenderInfo *);
  91.  
  92. VOID FillIn_RenderInfo(struct RenderInfo *, struct Screen *);
  93.  
  94. #endif  /* MKS_RENDERINFO_H */
  95.